var pageUtil={
  showPage:function(type,cpage,tpage,total,pagesize,changeMethod){
    var currentPage=parseInt(cpage);
    var countPage=parseInt(tpage);

    var str="";
    document.getElementById("pagination").innerHTML="";

    //分页模块1  12/35  24/35 35/35 显示当前页是展示的总数的数量
    if(currentPage==countPage){
      str+="&nbsp;&nbsp;"+total+"/"+total;
    }else {
      str+="&nbsp;&nbsp;"+currentPage*pagesize+"/"+total;
    }

    // 分页模块2 下拉切换每页显示数量
    str += "&nbsp;&nbsp;<span>每页显示：<select style=\"height:24px;line-height:24px;\" id='pagesize'>";
    str+="<option value='10'"
    if(pagesize==10){
      str+="selected";
    }
    str+=">10</option><option value='20'";
    if(pagesize==20)}{
      str+="selected";
    }
    str+=">20</option><option value='30'";
    if(pagesize==30){
      str+="selected";
    }
    str+=">30</option><option value='40'";
    if(pagesize==40){
      str+="selected";
    }
    str+="40</option>";
    str+="</select>&nbsp;&nbsp;&nbsp;</span>";

//分页模块3 上一页  下一页 以及中间的页面
   var startNum=0;
   //上一页
   if(currentPage==1){
      str+="<a href=\"javascript:void(0)\">上一页</a>";
   }else {
     str+="<a href=\"javascript:void(0)\" onclick=\""+changeMethod+"("+(currentPage-1) + "," + _pagesize + ")\"></a>"
   }


   







  }



}
